import axios from "./../utils/axios";
// import api from './../api/statistics'

function text() {
    return axios.get(api.statistics.statistics, {})
}
// 易耗品台账和条件查询
function select_ledger_yhp(checkEndTime,checkName,checkStartTime,className,facilityEncoding,limit,page) {
    return axios.post('/statistics/bill/consumable/page',{
        checkEndTime,checkName,checkStartTime,className,facilityEncoding,limit,page
    })
}
// 教学设备台账和条件查询
function select_ledger_jx(checkEndTime,checkName,checkStartTime,className,facilityEncoding,limit,page) {
    return axios.post('/statistics/bill/facility/page',{
        checkEndTime,checkName,checkStartTime,className,facilityEncoding,limit,page
    })
}
// 新增盘点
function create_pan(checkName, facilityClassification, id,uid) {
    return axios.post('/statistics/check/add', {
        checkName,
        facilityClassification,
        id,
        uid
    })
}
// 获取教学设备分类
function fenlei(checkEndTime,checkName,checkStartTime,facilityClassification,facilityEncoding,limit,page) {
    return axios.post('/statistics/stock/facility/page', {
        checkEndTime,checkName,checkStartTime,facilityClassification,facilityEncoding,limit,page
    })
}
// 获取易耗品分类
function fenleiB(checkEndTime,checkName,checkStartTime,facilityClassification,facilityEncoding,limit,page) {
    return axios.post('/statistics/stock/consumable/page', {
        checkEndTime,checkName,checkStartTime,facilityClassification,facilityEncoding,limit,page
    })
}
// 删除盘点
function delete_pan(ids) {
return axios.delete("/statistics/check/delete?ids="+ids)
}
// 新建盘点完成
function over_pan(checkName,cid,id,uid) {
    return axios.post('/statistics/check/add',{
        checkName,cid,id,uid
    })
}
// 盘点记录和条件查询
function record_pan(checkEndTime,checkName,checkStartTime,
className,facilityEncoding,limit,page) {
    return axios.post('/statistics/check/page',{
        checkEndTime,checkName,checkStartTime,
className,facilityEncoding,limit,page
    })
}
// 开始盘点
function start_pan(id) {
    // return axios.get("/statistics/check/start",{id,time})
    return axios.get(`/statistics/check/start/${id}`)
}
// 易耗品库存和条件查询
function select_invent_yhp(checkEndTime,checkName,checkStartTime,facilityClassification,facilityEncoding,limit,page) {
    return axios.post('/statistics/stock/consumable/page',{
        checkEndTime,checkName,checkStartTime,facilityClassification,facilityEncoding,limit,page
    })
}
// 教学设备库存和条件查询
function select_invent_jx(checkEndTime,checkName,checkStartTime,facilityClassification,facilityEncoding,limit,page) {
    return axios.post('/statistics/stock/facility/page',{
        checkEndTime,checkName,checkStartTime,facilityClassification,facilityEncoding,limit,page
    })
}
// 盘点范围
function area_pan() {
    // return axios.get("/statistics/check/start",{id,time})
    return axios.get(`/statistics/facility/class`)
}
// 盘点详情
function detail_pan(id,limit,page) {
    // return axios.get("/statistics/check/start",{id,time})
    return axios.post(`/statistics/check/start/page`,{
        id,limit,page
    })
}
// 盘点完成
function finish_pan(actualCheckNum,checkEndTime,id){
    return axios.post(`/statistics/check/finish`,{actualCheckNum,checkEndTime,id})
}
export default {
    text,
    select_ledger_yhp,
    select_ledger_jx,
    create_pan,
    delete_pan,
    over_pan,
    record_pan,
    start_pan,
    select_invent_yhp,
    select_invent_jx,
    fenlei,
    fenleiB,
    area_pan,
    detail_pan,
    finish_pan
}